<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>
<html lang="ko">
<head>
	<%@ include file="/include/header.jsp" %>
	<link rel="stylesheet" href="<%=cp %>/mobile/skin/board/notice/style.css">
	<%@ include file="/include/commonRes.jsp" %>
	
	<script type="text/javascript">
	$(function(){
		$("#btn_edit").click(function(){
			$("#editForm").submit();
			return false;
		});
		
		$("#btn_delete").click(function(){
			$("#deleteForm").submit();
			return false;
		});
		
	});
	</script>
</head>
<body>
	<%@include file="/include/mainMenuHeader.jsp" %>
	
	<form id="viewForm" action="<%=cp%>/bbs/notice_view.do" method="post">
		<input type="hidden" name="boardSeq" value=""/>
	</form>
	
	<form id="editForm" action="<%=cp%>/bbs/notice_edit.do" method="get">
		<input type="hidden" name="boardSeq" value="${bbs.boardSeq }"/>
	</form>
	
	<form id="deleteForm" action="<%=cp%>/bbs/notice_delete.do" method="post">
		<input type="hidden" name="boardSeq" value="${bbs.boardSeq }"/>
	</form>
	
	<div id="wrapper">
    	<div id="container">
			<script src="<%=cp%>/js/viewimageresize.js"></script>
			
			<!-- <div id="bo_v_table">공지 사항</div> -->
			
			<article id="bo_v" style="width:100%">
			    <header>
			        <h1 id="bo_v_title">[${bbs.boardName }] ${bbs.boardTitle }</h1>
			    </header>
			    <section id="bo_v_info">
			        <h2>페이지 정보</h2>
	        		<!--  작성자
	        		<strong><span class="sv_member">${bbs.regId }</span></strong>-->
		        	<span>작성일</span>
		        	<strong>${bbs.regDate }</strong>		        	
			    </section>
			
			    <section id="bo_v_atc">
			        <h2 id="bo_v_atc_title">본문</h2>
			        <div id="bo_v_img"></div>
			        <div id="bo_v_con">
			        	<%
			        		pageContext.setAttribute("brStr", "\r\n"); 
			        	%>
			        	${fn:replace(bbs.boardContents, brStr, '<br />')}
			        </div>
		            <div id="bo_v_act"></div>
                </section>
                
			    <div id="bo_v_bot">
			        <!-- 링크 버튼 -->
                    <!-- <ul class="bo_v_nb">
                    	<li><a href="#" class="btn_b01" id="prev_btn">이전글</a></li>
                        <li><a href="#" class="btn_b01" id="next_btn">다음글</a></li>        
                    </ul> -->
			        
			        <ul class="bo_v_com">
			        	<c:if test="${sessionScope.ss_mb.mb_auth_code==7 || sessionScope.ss_mb.mb_auth_code==8}">
			        		<li><a href="#" class="btn_b01" id="btn_edit">수정</a></li>            
		            		<li><a href="#" class="btn_b01" id="btn_delete">삭제</a></li>    
			        	</c:if>
		            	<li><a href="<%=cp %>/bbs/notice_list.do" class="btn_b01">목록</a></li>
			        </ul>
		    	</div>
			</article>
		</div>
	</div>
	<%@ include file="/include/footer.jsp" %>
</body>
</html>